import {request} from "@/utils/request";

class canvasApi {
  /**
   * @description: 获取客群
   * @param {*}
   * @return {*}
   */
  getUserGroupList(data) {
    let url = '/user/userGroup/userGroupList'
    return request(url, data)
  }

  /**
   * @description: 获取客群属性集
   * @param {*}
   * @return {*}
   */
  getPropertyList(data) {
    let url = '/user/userGroupProperty/propertyPage'
    return request(url, data)
  }

  /**
   * @description: 获取公共事件
   * @param {*}
   * @return {*}
   */
  geCanvasPublicEventEntity(data) {
    let url = '/flow/canvasPublicEventEntity/pageList'
    return request(url, data)
  }

  /**
   * @description: 获取短信模板
   * @param {*}
   * @return {*}
   */
  getSmsTemplate(data) {
    let url = '/reach/reachSmsTemplateEntity/pageList'
    return request(url, data)
  }

  /**
   * @description: 获取邮件模板
   * @param {*}
   * @return {*}
   */
  getEmailTemplate(data) {
    let url = '/reach/reachMailTemplateEntity/pageList'
    return request(url, data)
  }


  /**
   * @description: 更新画布
   * @param {*}
   * @return {*}
   */

  updateCanvas(data) {
    let url = '/flow/canvas/updateCanvas'
    return request(url, data)
  }

  /**
   * @description: 创建画布
   * @param {*}
   * @return {*}
   */
  createCanvas(data) {
    let url = '/flow/canvas/create'
    return request(url, data)
  }

  /**
   * @description: 获取预估人数
   * @param {*}
   * @return {*}
   */
  userGroupExpectNum(data) {
    let url = '/user/userGroupUser/userGroupExpectNum'
    return request(url, data)
  }

  /**
   * 获取 常规流程画布信息
   * @param data
   * @returns {Promise<AxiosResponse<T>>}
   */
  canvasGetInfo(data) {
    let url = '/flow/canvas/getInfo'
    return request(url, data)
  }

  /**
   * 根据流程模板获取商户信息
   * @param data
   * @returns {Promise<AxiosResponse<T>>}
   */
  canvasGetTemplateInfo(data) {
    return request('/flow/canvasTemplate/getInfo', data)
  }

  /**
   * @description: 获取营销模型列表
   * @param {*}
   * @return {*}
   */
   getMarketingModel(data) {
    let url = '/flow/marketingJourneyInfoEntity/pageList'
    return request(url, data)
  }

  /**
   * @description: 获取营销模型的策略
   * @param {*}
   * @return {*}
   */
   getStrategyl(data) {
    let url = '/flow/marketingJourneyStrategyEntity/pageList'
    return request(url, data)
  }

  /**
   * @description: 获取公众号模板消息的list
   * @param {*}
   * @return {*}
   */
   getPublicNumber(data) {
    let url = '/reach/reachPublicWxTemplateEntity/list'
    return request(url, data)
  }

  /**
   * @description: 获取活动列表
   * @param {*}
   * @return {*}
   */
   getActivityList(data) {
    let url = '/activity/actPager'
    return request(url,data)
  }



}

export default new canvasApi()
